package com.meida.student.app.user.handler;

import com.meida.common.base.entity.EntityMap;
import com.meida.common.mybatis.interceptor.PageInterceptor;
import com.meida.common.mybatis.model.PageParams;
import com.meida.common.mybatis.query.CriteriaQuery;
import com.meida.module.bus.client.entity.BusTag;
import org.springframework.stereotype.Component;

/**
 * 标签List扩展
 */
@Component("TagListHandler")
public class TagListHandler implements PageInterceptor<BusTag> {

    @Override
    public void prepare(CriteriaQuery<BusTag> cq, PageParams pageParams, EntityMap params) {
        cq.clear();
        cq.select(BusTag.class, "tagId", "tagName", "tagSort");
        cq.eq(BusTag.class, "tagState", 1);
        cq.eq(BusTag.class, "tagGroup");
        cq.orderByAsc("tagSort");
    }

}
